﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Travianer.Controller
{
    public sealed class LogicController
    {
        private static readonly LogicController _Instance;
        
        static LogicController()
        {
            _Instance = new LogicController();
        }

        public static LogicController GetInstance()
        {
            return _Instance;
        }

        private LogicController()
        {
            
        }

        public bool IsShownew(string url)
        {
            string lower = url.ToLower();
            return lower.IndexOf("shownew.php") > 0;
        }
        public bool IsLoginForm(string url)
        {
            string lower = url.ToLower().TrimEnd('/');
            return lower.IndexOf("index.php") > 0
                || lower.Replace("http://", "").IndexOf("/") == -1;
        }
    }
}
